CREATE TABLE [dbo].[TTRUBR_GAST]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_TIPO_GAST] [dbo].[TD_VC_003] NOT NULL,
[CO_RUBR_GAST] [dbo].[TD_VC_003] NOT NULL,
[DE_RUBR_GAST] [dbo].[TD_VC_100] NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TTRUBR_GA__CO_US__009FF5AC] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TTRUBR_GA__FE_US__019419E5] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TTRUBR_GA__CO_US__02883E1E] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TTRUBR_GA__FE_US__037C6257] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTRUBR_GAST] ADD CONSTRAINT [PK__TTRUBR_G__6962A3467EF7A45C] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_TIPO_GAST], [CO_RUBR_GAST]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTRUBR_GAST] ADD CONSTRAINT [FK__TTRUBR_GAST__6C39D5A3] FOREIGN KEY ([CO_EMPR], [CO_TIPO_GAST]) REFERENCES [dbo].[TTTIPO_GAST] ([CO_EMPR], [CO_TIPO_GAST])
GO
